{% extends 'layouts/master-page' %}
{% block title %}Most recent entries{% endblock %}
{% block head %}
  <!-- css -->
  <link href="/static/css/custom/filter.css" rel="stylesheet" />

  <!-- javascript -->
  <script type="text/javascript" src="/static/js/custom/filter.js"></script>
  <script type="text/javascript" src="/static/js/custom/pager.js"></script>
  <script type="text/javascript">
    $(document).ready(function(){
      setFilters();
      {% if errors %}
        setStatus("An error occured while parsing the filters. Please verify the input fields, like the dates", "danger");
      {% endif %}
    })
    function setFilters(){
      {% if filters is defined %}
        {% for key, val in filters.items() %}
          if($("#{{key}}").is(":checkbox")){
            if("{{val}}" === "on"){$("#{{key}}").prop('checked', true);}
          }else{
            $("#{{key}}").val("{{val}}");
          }
        {% endfor %}
        cvssSelectDisable()
        timeSelectDisable()
      {%endif%}
    }
  </script>
{% endblock %}
{% block content %}
  <!-- Filter options -->
  {% include 'subpages/filters.html' %}
  <!-- Pager -->
  {% include 'subpages/pager.html' %}
  <!-- Search results -->
  {% include 'subpages/table.html' %}
  <!-- Pager -->
  {% include 'subpages/pager.html' %}
  <!-- end content -->
{% endblock %}
